package rursu.view;

import rursu.business.MovieApplication;
import rursu.business.R;
import android.support.v4.view.Menu;
import android.util.Log;
import android.view.MenuInflater;

public class MoviesFragment extends BaseMoviesFragment {

	private static final String LOGGER_TAG = MoviesFragment.class.getCanonicalName();

	@Override
	public void onResume() {
		super.onResume();
			
		// if settings were changed
		if (((MovieApplication) getActivity().getApplication()).getDataProviderManager().getSettings().isChanged()) {
			((MovieApplication) getActivity().getApplication()).getDataProviderManager().getRecentMovies(this);
		}

		isFirstShow = true;
		Log.d(LOGGER_TAG, "onResume launched");
	}
	
	@Override
	public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {	
		super.onCreateOptionsMenu(menu, inflater);
		inflater.inflate(R.menu.menu, menu);
		
	}
	
}
